#include "dut/ShaderGenerator.h"


void Dut::ShaderGenerator::Create()
{

	Dut::ShaderFile shaderFile;
	shaderFile.m_Name = "Cube";
	shaderFile.m_CommonContext = R"(

cbuffer PassBuffer : register(b0)
{
    matrix Projection;
    matrix View;
}


cbuffer ObjBuffer : register(b1)
{
    matrix World;
}

cbuffer MatBuffer: register(b0)
{
    float4 color;
}

struct VS_OUTPUT
{
    float4 Pos : SV_POSITION;
    
};


struct PS_Output
{
    float4 color0 : SV_Target0;
    float4 color1 : SV_Target1;
};



)";
    shaderFile.m_VsContext = R"(
VS_OUTPUT VS(float4 Pos : POSITION)
{
    VS_OUTPUT output = (VS_OUTPUT) 0;
    output.Pos = mul(Pos, World);
    output.Pos = mul(output.Pos, View);
    output.Pos = mul(output.Pos, Projection);
    return output;
}

)";
    shaderFile.m_PsContext=R"(

PS_Output PS(VS_OUTPUT input) : SV_Target
{
PS_Output res;

res.color0=color;
res.color1=float4(0.5f,1.f,0.5f,1.0f);

return res;     
}
)";
    shaderFile.Create("shaders");
}